home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Source / GNU / uucp / Uucp.framework / unix.subproj / chmod.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-09  |  432 b   |  26 lines

  1. /* chmod.c
  2.    Change the mode of a file.  */
  3.  
  4. #include "uucp.h"
  5.  
  6. #include "uudefs.h"
  7. #include "sysdep.h"
  8. #include "system.h"
  9.  
  10. #include <errno.h>
  11.  
  12. /* Change the mode of a file.  */
  13.  
  14. boolean
  15. fsysdep_change_mode (zfile, imode)
  16.      const char *zfile;
  17.      unsigned int imode;
  18. {
  19.   if (chmod ((char *) zfile, imode) < 0)
  20.     {
  21.       ulog (LOG_ERROR, "chmod (%s): %s", zfile, strerror (errno));
  22.       return FALSE;
  23.     }
  24.   return TRUE;
  25. }
  26.